﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/AdminMasterPage.master" AutoEventWireup="true"
    CodeFile="Users.aspx.cs" Inherits="admin_Users" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="idUser"
        DataSourceID="SqlUsers" EnableModelValidation="True" 
    AllowPaging="True" AllowSorting="True" BackColor="White" BorderColor="#999999" 
    BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" 
    GridLines="Vertical">
        <AlternatingRowStyle BackColor="#CCCCCC" />
        <Columns>
            <asp:BoundField DataField="idUser" HeaderText="idUser" InsertVisible="False" ReadOnly="True"
                SortExpression="idUser" />
            <asp:BoundField DataField="email" HeaderText="email" SortExpression="email" />
            <asp:BoundField DataField="password" HeaderText="password" SortExpression="password" />
            <asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
            <asp:BoundField DataField="phone" HeaderText="phone" SortExpression="phone" />
            <asp:BoundField DataField="credit" HeaderText="credit" SortExpression="credit" />
            <asp:CheckBoxField DataField="type" HeaderText="Admin" SortExpression="type" />

            <asp:TemplateField>
                <ItemTemplate>
                    <table>
                        <asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqPayments">
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <%#Eval("idPayment") %>
                                    </td>
                                    <td>
                                        <%#Eval("amount")%>
                                    </td>
                                    <td>
                                        <%#Eval("bank")%>
                                    </td>
                                    <td>
                                        Confirmado:<%#Eval("confirmed")%></td>
                                </tr>
                            </ItemTemplate>
                        </asp:Repeater>
                        <asp:SqlDataSource ID="SqPayments" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
                            SelectCommand="SELECT * FROM [payments]"></asp:SqlDataSource>
                    </table>
                </ItemTemplate>
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" />
        <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
    <asp:SqlDataSource ID="SqlUsers" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
        SelectCommand="SELECT * FROM [users]"></asp:SqlDataSource>
</asp:Content>
